set(src_list_pub
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_ring_concurrent_direct.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_ring_concurrent_direct.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/scatter_ring_concurrent_direct.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_halving_doubling.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_mesh.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_mesh_direct.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_mesh_atomic.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_reduce_recursive_hd.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_reduce_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/bcast_halvingdoubling.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/bcast_recursive_halvingdoubling.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/broadcast_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/broadcast_star.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/executor_base.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/recursive_halvingdoubling_base.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_halving_doubling.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_recursive_hd.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_mesh.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_mesh_atomic.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/scatter_mesh.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/scatter_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/multi_root_scatter_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/send_receive.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/all_gather_recursive_hd.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/gather_ring.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/gather_mesh.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/gather_star.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_recursive_hd.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_pairwise.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_staged_base.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_staged_pairwise.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_staged_mesh.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv_staged_calculator.cc
    ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_mesh_atomic_opbase.cc
)

target_sources(hccl_alg PRIVATE
    ${src_list_pub}
)

add_subdirectory(component)
